<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<body></body>
<script>
  promise_test(async (t) => {
    const input = document.createElement("input");
    input.setAttribute("type", "color");

    await test_driver.bless("show color picker");
    input.showPicker();
    assert_not_equals(internals.pagePopupWindow, null, "Picker is opened.");

    internals.endColorChooser(input);
    assert_equals(internals.pagePopupWindow, null, "Picker is closed.");
  }, "Color picker: showPicker() should show picker");
</script>
